Skip to content

feat(i18n): add Korean (ko) locale - #13674

Open
YeonghyeonKO wants to merge 1 commit into
langflow-ai:mainfrom
YeonghyeonKO:feat/korean-i18n-upstream
Open

feat(i18n): add Korean (ko) locale#13674
YeonghyeonKO wants to merge 1 commit into
langflow-ai:mainfrom
YeonghyeonKO:feat/korean-i18n-upstream

Conversation

@YeonghyeonKO

@YeonghyeonKO YeonghyeonKO commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ko / 한국어 to SUPPORTED_LANGUAGES in src/frontend/src/constants/languages.ts and src/frontend/src/i18n.ts
  • Adds i18n.changeLanguage(lang) after addResourceBundle in loadLanguage so the UI re-renders immediately when the lazy bundle finishes loading
  • Adds src/frontend/src/locales/ko.json with 2,228 translated strings covering every key in en.json

The locale file follows the same flat-key structure used by all other locale files (fr, ja, zh-Hans, etc.).

Rebased onto current main

This branch has been rebased onto current main. ko.json was regenerated against the latest en.json:

Verification

  • Key set is identical to en.json (2,228 keys, no missing and no extra)
  • Key order matches en.json
  • Every {{interpolation}} placeholder and <1>…</1> Trans tag matches the corresponding English string exactly (0 mismatches)
  • Plural forms (_one / _other) are present for all counted strings, matching the convention used by the other locale files

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Korean (ko / 한국어) is added to the SUPPORTED_LANGUAGES constant and to the normalizeLanguage allowlist in i18n.ts. Additionally, loadLanguage is updated to call i18n.changeLanguage(lang) after registering a non-English locale bundle.

Changes

Korean language support and i18n activation fix

Layer / File(s) Summary
Korean registration and language activation fix
src/frontend/src/constants/languages.ts, src/frontend/src/i18n.ts
Adds { code: "ko", label: "한국어" } to SUPPORTED_LANGUAGES, adds "ko" to the normalizeLanguage supported codes, and adds i18n.changeLanguage(lang) call in loadLanguage after a non-English locale bundle is imported and registered.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 6 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Quality And Coverage ⚠️ Warning No tests added for Korean language support. New i18n functionality (i18n.changeLanguage call) and Korean locale loading not tested; existing tests use mocks instead of validating actual behavior. Add tests to i18n.test.ts verifying loadLanguage('ko') loads the bundle successfully and i18n.changeLanguage is called; verify all translation keys present.
Test File Naming And Structure ⚠️ Warning PR adds Korean language support but lacks corresponding test coverage. No new tests were added to verify the Korean locale loads correctly, that the added i18n.changeLanguage() call works properly,... Add tests for Korean language: test that ko.json loads successfully, verify i18n.changeLanguage() is called in loadLanguage(), test normalizeLanguage() accepts 'ko', and add parametrized/data-driven tests for supported languages.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding Korean locale support to the i18n system.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Implementations ✅ Passed PR includes comprehensive test coverage for new functionality: 2 frontend i18n test files (3+5 tests) covering loadLanguage and changeLanguage behavior, 1 component test file (8 tests) covering Lan...
Excessive Mock Usage Warning ✅ Passed This PR adds Korean language support (locale configuration, translation file, and UI re-render fix). No test files were added or modified in this PR, making the mock usage check not applicable.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jun 16, 2026
- Add `ko` / `한국어` to SUPPORTED_LANGUAGES in languages.ts and i18n.ts
- Add `i18n.changeLanguage(lang)` after bundle load so the UI re-renders
  immediately when a lazy locale finishes loading
- Add `src/frontend/src/locales/ko.json` with 2 228 translated strings
  covering every key in en.json

Rebased onto current main; ko.json now covers the keys added since the
branch was opened (a11y labels, A2A agent tab, HITL, the parameter
manager inspection panel, Azure AI Foundry deployments) and drops the
keys removed upstream. Key set and interpolation placeholders are
verified to match en.json exactly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant